<!DOCTYPE html>
<html>
<head>
<title>会员信息详情</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="" name="description">
<meta content="" name="author">
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css"
	rel="stylesheet" type="text/css">

<link
	href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css"
	id="style_components" rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/css/plugins.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/layout.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css"
	rel="stylesheet" type="text/css" id="style_color">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/custom.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css"
	href="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.css" />
<link
	href="${request.getContextPath()}/Public/assets/admin/css/common.css"
	rel="stylesheet" type="text/css">
<!-- pandora-dialog 弹层组件样式 -->
<link
	href="${request.getContextPath()}/Public/js/pandora/css/dialog.css"
	rel="stylesheet" type="text/css">

<!--  -->
<link rel="shortcut icon"
	href="${request.getContextPath()}/Public/favicon.ico" type="text/css">
<link rel="lrtk
	href="
	${request.getContextPath()}/Public/css/lrtk.css" type="text/css">

<!-- layer web弹层组件样式 -->
<link href="${request.getContextPath()}/Public/js/layer/skin/layer.css"
	rel="stylesheet" type="text/css">
	<link href="${request.getContextPath()}/Public/js/layer/skin/layer.ext.css"
	rel="stylesheet" type="text/css">
<script>
	BASE_URL = '${request.getContextPath()}';
</script>
<!-- loading 样式 -->
<link href="${request.getContextPath()}/Public/css/loading.css"
	rel="stylesheet" type="text/css">
<style type="text/css">
.datepicker {
	font-size: 16px;
}

.datepicker td, .datepicker th {
	width: 14.28571428571429%;
	height: 40px;
}

.table-condensed {
	width: 100%;
}

.datepicker-inline {
	width: 100%;
}

.col-md-3, .col-md-6 {
	padding-right: 0px;
	padding-left: 0px;
}
</style>

</head>

<body class="page-header-top-fixed page-footer-fixed">
	<!--头部信息结束 -->
	<div class="page-header">
		<!--头部开始-->
		<#include "/include/top.html" />
		<!-- 头部信息结束 -->
	</div>
	<!-- END HEADER -->


	<!-- BEGIN PAGE CONTAINER -->
	<div class="page-container">
		<#include "/include/menu.html" />
		<!-- 首页内容开始 -->
		<div class="page-content-wrapper">
			<div class="page-content">
				<div class="container-fluid" id="indexContext">
					<div id="loading" style="display: none;" class="loading"
						align="center">
						<br /> <br /> <br /> <br /> <img class="loadingimg"
							src="${request.getContextPath()}/Public/images/loading.gif" />
					</div>
					<h4 align="left">会员资料</h4>
					<div align="center">
						<table
							class="table table-striped table-bordered table-hover ttTbl">
							<tr>
								<th align="left" width="22%">邮箱/会员名</th>
								<td align="left" width="22%">${(vip.userName)!}</td>
								<th align="left" width="22%">会员ID</th>
								<td align="left">${(vip.userId)!}</td>
							</tr>

							<tr>
								<th align="left" width="22%">公司全称</th>
								<td align="left" width="22%">${(vip.companyName)!}</td>
								<th align="left" width="22%">绑定商城用户名</th>
								<td align="left">${(vip.mallId)!}</td>
							</tr>

							<tr>
								<th align="left" width="22%">公司地址</th>
								<td align="left" width="22%"><input class="form-control"
									onblur="if(value == '' ){value='${(vip.companyAddr)!}'}"
									id="companyAddr" value="${(vip.companyAddr)!}"></td>
								<th align="left" width="22%">营业执照号</th>
								<td align="left" width="22%"><input class="form-control"
									onblur="if(value == '' ){value='${(vip.certificateNo)!}'}"
									id="certificateNo" value="${(vip.certificateNo)!}"></td>
							</tr>

							<tr>
								<th align="left" width="22%">联系人姓名</th>
								<td align="left" width="22%"><input class="form-control"
									onblur="if(value == '' ){value='${(vip.contactName)!}'}"
									id="contactName" value="${(vip.contactName)!}"></td>
								<th align="left" width="22%">联系电话</th>
								<td align="left"><input class="form-control"
									onblur="if(value == '' ){value='${(vip.phone)!}'}" id="phone"
									value="${(vip.phone)!}"></td>
							</tr>

							<tr>
								<th align="left" width="22%">手机号</th>
								<td align="left" width="22%"><input class="form-control"
									onblur="if(value == '' ){value='${(vip.mobilePhone)!}'}"
									id="mobilePhone" value="${(vip.mobilePhone)!}"></td>
								<th align="left" width="22%">邮编</th>
								<td align="left" width="22%"><input class="form-control"
									onblur="if(value == '' ){value='${(vip.companyPostCode)!}'}"
									id="companyPostCode" value="${(vip.companyPostCode)!}"></td>
							</tr>

							<tr>
								<th align="left" width="22%">注册时间</th>
								<td align="left" width="22%">${(vip.registerTime)!}</td>
								<th align="left" width="22%">注册IP</th>
								<td align="left" width="22%">${(vip.registerIp)!}</td>
							</tr>

							<tr>
								<th align="left" width="22%">资金</th>
								<td align="left" width="22%">${(vip.sumMoney?string(',###.##'))!}</td>
								<th align="left" width="22%">上次登录IP</th>
								<td align="left" width="22%">${(vip.lastLoginIp)!}</td>
							</tr>

							<tr>
								<th align="left" width="22%">冻结资金</th>
								<td align="left" width="22%">${(vip.freezeMoney?string(',###.##'))!}</td>
								<th align="left" width="22%">可用余额</th center" width="22%">
								<td align="left" width="22%">${(vip.useMoney?string(',###.##'))!}</td>
							</tr>
							<tr>
								<th align="left" width="22%">登录次数</th>
								<td  align="left">${(vip.login_num)!"0"}</td>
								<th align="left" width="22%">附属银行账号</th>
								<td  align="left">${(vip.userAccountNo)!}</td>

							</tr>
						</table>
					</div>

					<h4 align="left">银行资料</h4>
					<div>
						<table
							class="table table-striped table-bordered table-hover ttTbl">
							<#list banklist as bank>
							<tr>
								<th align="center" width="22%">开户行</th>
								<td align="center" width="22%">${(bank.bankName)!}</td>
								<th align="center" width="22%">账号</th>
								<td align="center" width="22%">${(bank.bankAccountNo)!}
									<#if bank?? && bank.auditStatus?? && bank.auditStatus==0> <a
									href="${request.getContextPath()}/accountAudit/accountList.do"
									style="color: blue;"> 未验证</a> </#if> <!-- 
								<#if bank?? &&  bank.auditStatus??  &&  bank.auditStatus==1>
								<a href="#" style="color: Black;"> 已验证</a>
								</#if>
								<#if bank?? &&  bank.auditStatus??  &&  bank.auditStatus==2>
								<a href="#" style="color: red;"> 已关闭</a>
								</#if>
								 -->
								</td>
							</tr>
							</#list>
						</table>
					</div>

					<h4 align="left">认证信息</h4>
					<div style="width: 60%;">
					<table>
					<tr>
					  <#if vip.isCommon == 0>
								 <td ><iframe id="ifa0" style="width:220px;padding-right:20px;padding-right:20px;vtical-align: top; padding-top: 0px; margin: 0px;" border="none" 
								        onload="this.height=this.contentWindow.document.body.scrollHeight;" marginwidth="0" marginheight="" allowtransparency="yes" 
								        frameborder="no" id="url1" scrolling="no"
									    alt="营业执照" src="${frontHost}rest/user/loadImage?imageUrl=${(vip.certificateUrl)!}&index=0&width=150px&height=200px"
										onerror="this.src='${request.getContextPath()}/Public/images/user/1.png';this.onerror=null;"
										> </iframe>
										<a href="javascript:alertImage('rest/user/loadImage?imageUrl=${(vip.certificateUrl)!}&width=400px&height=700px','700px','400px')" style="color: blue;">查看大图</a>
										</td>
								 <td ><iframe id="ifa1" style="width:220px;padding-right:20px;vtical-align: top; padding-top: 0px; margin: 0px;" border="none" 
								        onload="this.height=this.contentWindow.document.body.scrollHeight;" marginwidth="0" marginheight="" allowtransparency="yes" 
								        frameborder="no" id="url2" scrolling="no"
										alt="法人身份证" src="${frontHost}rest/user/loadImage?imageUrl=${(vip.idCardUrl)!}&width=150px&height=200px"
										onerror="this.src='${request.getContextPath()}/Public/images/user/2.png';this.onerror=null;"
										> </iframe>
										<a href="javascript:alertImage('rest/user/loadImage?imageUrl=${(vip.idCardUrl)!}&width=400px&height=700px','700px','400px')" style="color: blue;">查看大图</a>
										</td>
								
								 <td ><iframe id="ifa2" style="width:220px;padding-right:20px;vtical-align: top; padding-top: 0px; margin: 0px;" border="none" 
								        onload="this.height=this.contentWindow.document.body.scrollHeight;" marginwidth="0" marginheight="" allowtransparency="yes" 
								        frameborder="no" id="url3" scrolling="no"
									    alt="税务登记证" src="${frontHost}rest/user/loadImage?imageUrl=${(vip.registeryCertificateUrl)!}&width=150px&height=200px"
										onerror="this.src='${request.getContextPath()}/Public/images/user/3.png';this.onerror=null;"
										> </iframe>
										<a href="javascript:alertImage('rest/user/loadImage?imageUrl=${(vip.registeryCertificateUrl)!}&width=400px&height=700px','700px','400px')" style="color: blue;">查看大图</a>
										</td>
								<#else>
								 <td ><iframe id="ifa1" style="width:220px;padding-right:20px;vtical-align: top; padding-top: 0px; margin: 0px;" border="none" 
								        onload="this.height=this.contentWindow.document.body.scrollHeight;" marginwidth="0" marginheight="" allowtransparency="yes" 
								        frameborder="no" id="url2" scrolling="no"
										alt="法人身份证" src="${frontHost}rest/user/loadImage?imageUrl=${(vip.threeCertificatesUrl)!}&width=150px&height=200px"
										onerror="this.src='${request.getContextPath()}/Public/images/user/2.png';this.onerror=null;"
										> </iframe>
										<a href="javascript:alertImage('rest/user/loadImage?imageUrl=${(vip.threeCertificatesUrl)!}&width=400px&height=700px','700px','400px')" style="color: blue;">查看大图</a>
										</td>
								</#if>
								 <td><iframe id="ifa2" style="width:220px;padding-right:20px;vtical-align: top; padding-top: 0px; margin: 0px;" border="none" 
								        onload="this.height=this.contentWindow.document.body.scrollHeight;" marginwidth="0" marginheight="" allowtransparency="yes" 
								        frameborder="no" id="url3" scrolling="no"
										alt="税务登记证" src="${frontHost}rest/user/loadImage?imageUrl=${(vip.bankOpenUrl)!}&width=150px&height=200px"
										onerror="this.src='${request.getContextPath()}/Public/images/user/3.png';this.onerror=null;"
										> </iframe>
										<a href="javascript:alertImage('rest/user/loadImage?imageUrl=${(vip.bankOpenUrl)!}&width=400px&height=700px','700px','400px')" style="color: blue;">查看大图</a>
										</td>
								 <td ><iframe id="ifa3" style="width:220px;padding-right:20px;vtical-align: top; padding-top: 0px; margin: 0px;" border="none" 
								        onload="this.height=this.contentWindow.document.body.scrollHeight;" marginwidth="0" marginheight="" allowtransparency="yes" 
								        frameborder="no" id="url4" scrolling="no"
									    alt="管理员授权委托书" src="${frontHost}rest/user/loadImage?imageUrl=${(vip.authorizeUrl)!}&index=0&width=150px&height=200px"
										onerror="this.src='${request.getContextPath()}/Public/images/user/4.png';this.onerror=null;"
										> </iframe>
										<a href="javascript:alertImage('rest/user/loadImage?imageUrl=${(vip.authorizeUrl)!}&width=400px&height=700px','700px','400px')" style="color: blue;">查看大图</a>
										</td>
								<tr>
								</table>
					</div>

					<div>
						<form action="">
							<table align="center" style="width: 50%;">
								<tr align="center">
									<td width="20%" align="center">
										<button class="btn red" onclick="savemanage()" type="button">
											<i class="fa fa-search"></i> 保存信息
										</button>
									</td> <#if vip.auditStatus??&&vip.auditStatus==0>
									<td width="20%" align="center">
										<button class="btn red" onclick="vipmanage(1)" type="button">
											<i class="fa fa-search"></i> 审核通过
										</button>
									</td>
									<td width="20%" align="center">
										<button class="btn red" onclick="auditStatusClose('${vip.userId}')" type="button">
											<i class="fa fa-search"></i> 关闭
										</button>
									</td> </#if> <#if vip.auditStatus??&&vip.auditStatus==1>
									<td width="20%" align="center">
										<button class="btn red"
											onclick="cancelUser('${vip.userId}','${vip.userAccountNo}')"
											type="button">注销用户</button>
									</td> </#if >
									<td width="20%" align="center"><input type="button"
										class="btn red" onclick="javascript :history.back(-1);"
										value="返回"></td>
								</tr>
							</table>
						</form>
					</div>
					<br> <br>
				</div>
			</div>
		</div>

		<!-- END PAGE CONTENT -->
	</div>
	<#include "/include/foot.html" />

	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/jquery.sparkline.min.js"
		type="text/javascript"></script>

	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker-index.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js"
		type="text/javascript"></script>
	<script
		src="${request.getContextPath()}/Public/assets/global/plugins/highcharts.js"
		type="text/javascript"></script>
	<!-- layer web弹层组件-->
	<script type="text/javascript"
		src="${request.getContextPath()}/Public/js/layer/layer.js"></script>
	<script type="text/javascript"
		src="${request.getContextPath()}/Public/js/layer/extend/layer.ext.js"></script>
	<!-- pandora-dialog 弹层组件 -->
	<script type="text/javascript"
		src="${request.getContextPath()}/Public/js/pandora/pandora-dialog.js"></script>
	<script>
	
	
		jQuery(document).ready(function() {

			Metronic.init();
			Layout.init();
			
			/* layer.config({
			    extend: '${request.getContextPath()}/Public/js/layer/extend/layer.ext.js'
			}); 
			layer.photos({
				html: '',
				json: json
			});*/

		});
		
		function weituoshu(){
			window.location.href="";	
		}
		
		//注销用户
		function cancelUser(userid,userAccountNo) {
		 	$.confirm("是否要关闭并注销该用户?", function () {
		    	var resultCode; 
				$.ajax({
					url : "${request.getContextPath()}/vip/cancelUser.do",
					type : "post",
					dataType:'JSON',
					data:{"userid":userid,"userAccountNo":userAccountNo},
					success : function(result) {
						if (result.result == "success") {
							alert("注销成功");
							window.location.href="${request.getContextPath()}/vip/vipList.do?";	
						}else{
							alert(result.message);
							window.location.href="${request.getContextPath()}/vip/vipList.do?";	
						}
					}
				});
			});
			return false;
		}
		
	//审核通过	
	function   vipmanage(auditStatus){
		CommonUtils.confirm("提示","是否确认审核通过该用户?", "gotoAudit("+auditStatus+")");
	}
	function gotoAudit(auditStatus) {
		document.getElementById("loading").style.display ="block";
		var msg="审核失败";
		$.ajax({
			url : "${request.getContextPath()}/vip/vipmanage.do",
			type : "post",
			dataType:"json",
			async: false,
			data :{"auditStatus":auditStatus,"userId":${(vip.userId)!} }, //联动查询的字符
			success : function(data) {
				if(data.Result=="Success"){
					document.getElementById("loading").style.display ='none';

					if(status==1){
						msg="审核通过<br><a href='${request.getContextPath()}/accountAudit/accountList.do'>审核会员绑定账户</a>";
					
					}
					if(status==0){
						msg="审核成功";
					}
					if(status==2){
						msg="审核成功";
					}
					
					
					CommonUtils.succModal2("系统提示",
							msg,"${request.getContextPath()}/vip/vipDetails.do?userId="+${(vip.userId)!});
					
				}else {
					msg=data.msg;
					CommonUtils.succModal2("系统提示",
							msg);
				}
			 
			}
		});	
		
	}
		//保存会员信息
		function   savemanage(){
			var companyAddr=$("#companyAddr").val();
			var certificateNo=$("#certificateNo").val();
			var contactName=$("#contactName").val();
			var mobilePhone=$("#mobilePhone").val();
			var companyPostCode=$("#companyPostCode").val();
			var phone=$("#phone").val();
			$.ajax({
				url : "${request.getContextPath()}/vip/saveManage.do",
				type : "post",
				dataType:"json",
				async: false,
				data :{"companyAddr":companyAddr,
					"certificateNo":certificateNo,
					"contactName":contactName,
					"mobilePhone":mobilePhone,
					"companyPostCode":companyPostCode,
					"phone":phone,
					"userId":${(vip.userId)!}}, //联动查询的字符
				success : function(data) {
					if(data.code=='success'){
						CommonUtils.succModal2("系统提示",
								"保存成功!","${request.getContextPath()}/vip/vipDetails.do?userId="+${(vip.userId)!});
						
					}else{
						CommonUtils.succModal2("系统提示",
								"保存失败!");
					}
					
					
				}
				});
		}
		
		
		
	function alertImage(url,w,h){
        url = '${frontHost}'+url;
		window.open(url,"查看图片大图","width="+w+",height="+h);
				
	}
	function showdiv() { 

	document.getElementById("loading").style.display ="block";
	}
	 function hidediv() {
	 document.getElementById("show").style.display ='none';
	 }
	 
	//关闭用户
		function auditStatusClose(userid) {
		 	$.confirm("是否要关闭该用户?", function () {
				$.ajax({
					url : "${request.getContextPath()}/vip/auditStatusClose.do",
					type : "post",
					dataType:'JSON',
					data:{"userid":userid},
					success : function(result) {
						if (result.result == "success") {
							alert(result.message);
							window.location.href="${request.getContextPath()}/vip/vipList.do?";	
						}else{
							alert(result.message);
							window.location.href="${request.getContextPath()}/vip/vipList.do?";	
						}
					}
				});
			});
			return false;
		}
		
		
    
	
	</script>
</body>
</html>
